package gov.pbc.nn.kjgl.software.handle;

import gov.pbc.nn.core.utils.SecurityUtils;
import gov.pbc.nn.kjgl.Constants;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.springframework.stereotype.Component;

import com.bstek.bdf2.core.business.IUser;
import com.bstek.uflo.env.Context;
import com.bstek.uflo.model.ProcessInstance;
import com.bstek.uflo.process.handler.AssignmentHandler;
import com.bstek.uflo.process.node.TaskNode;

@Component("kjcShAssignmentHandler")
public class KjcShAssignmentHandler implements AssignmentHandler {

	@Override
	public Collection<String> handle(TaskNode node, ProcessInstance pi,
			Context context) {
		List<String> users = new ArrayList<String>();
		List<IUser> czUsers = SecurityUtils.getUserByRoleForDept("489145101024", Constants.ROLE_CZ);
		for(IUser u:czUsers){
			users.add(u.getUsername());
		}
		return users;
	}

}
